<?php


require_once('class/cruds.php');
include('config.php');


$user_cruds = new CRUDS();
$user_cruds -> set_table ('user');

$username_kop = $_POST ['usename'];
$password_kop = md5($_POST ['pass']);

$arr = array(
	'USERNAME' => "'".$username_kop."'",
	'PASSWORD' => "'".$password_kop."'",
	);
	
	$user_cruds->insert($arr);

$kop_cruds = new CRUDS();
$kop_cruds->set_table ('koperasi');


$nama_kop = $_POST ['nama'];
$alamat_kop = $_POST ['alamat'];
$prov_kop = $_POST ['provinsi'];
$kota_kop = $_POST ['kota'];
$telp_kop = $_POST ['notelp'];
$fax_kop = $_POST ['nofax'];
$tgl_pdiri = $_POST ['tanggal'];
$info_kop = $_POST ['info'];
$arr = array(
	'NAMAKOPERASI' => "'".$nama_kop."'",
	'NOTELP' => $telp_kop,
	'NOFAX' => $fax_kop,
	'TGLBERDIRI' => "'".$tgl_pdiri."'",
	'INFORMASI' => "'".$info_kop."'",
	'IDKOTA' => "'".$kota_kop."'",
	'IDPROPINSI' => $prov_kop,
	//'IDUSER' => 
	
);

$kop_cruds->insert($arr);

?>